package home_8_19.Person;

public class Employee extends Person {
    int hiredate;
    double sal;

    @Override
    public void show() {
        System.out.println("class Person");
    }
    public void addSal(){
       if (hiredate>1){
           sal = sal*1.1;
       }

    }
    public void addSal(double jiaXin){
        if (hiredate>1){
            if (jiaXin<sal*0.5){
                this.sal = this.sal+jiaXin;
            }else {
                this.sal = sal*1.5;
            }
        }
    }
}
